const initState = {
  user: {}
}


const auth = (state = initState, action) => {
  switch (action.type) {
    case "setUser":
      let currentUser = Object.assign({}, state);
      currentUser.user = action.user
      return currentUser;
    default:
      return state;
  }

}

export default auth